Author: mkuster Date: Sat Jan 31 23:34:41 2009 New Revision: 11
Log: reading the snapshots feed for the ontology repaired
Modified: trunk/src/model/changes.lisp trunk/src/model/datamodel.lisp trunk/src/rest_interface/read.lisp
Modified: trunk/src/model/changes.lisp ============================================================================== --- trunk/src/model/changes.lisp (original) +++ trunk/src/model/changes.lisp Sat Jan 31 23:34:41 2009 @@ -241,7 +241,7 @@ (some (lambda (ii) (string-starts-with (uri ii) source-locator)) (item-identifiers construct)) (let ((ii-uri (format nil "~a/~d" source-locator (internal-id construct)))) - (make-instance 'ItemIdentifierC :uri ii-uri :identified-construct construct)))) + (make-instance 'ItemIdentifierC :uri ii-uri :identified-construct construct :start-revision revision))))
(defmethod add-source-locator ((top TopicC) &key source-locator revision) ;topics already have the source locator in (at least) one PSI, so we
Modified: trunk/src/model/datamodel.lisp ============================================================================== --- trunk/src/model/datamodel.lisp (original) +++ trunk/src/model/datamodel.lisp Sat Jan 31 23:34:41 2009 @@ -263,7 +263,7 @@
(defmethod add-to-version-history ((construct TopicMapConstructC) &key - (start-revision (error "Must be present") ) + (start-revision (error "Start revision must be present") ) (end-revision 0)) "Adds relevant information to a construct's version info" (let @@ -470,7 +470,7 @@ (string= (uri identifier1) (uri identifier2)))
(defmethod initialize-instance :around ((identifier PointerC) &key - (start-revision (error "Must be present") ) + (start-revision (error "Start revision must be present") ) (end-revision 0)) (call-next-method) (add-to-version-history identifier
Modified: trunk/src/rest_interface/read.lisp ============================================================================== --- trunk/src/rest_interface/read.lisp (original) +++ trunk/src/rest_interface/read.lisp Sat Jan 31 23:34:41 2009 @@ -44,7 +44,7 @@ (read-url snapshot-feed-url))) (parse-snapshots-feed snapshot-feed)))
-(defun import-fragments-feed (tm-id fragment-feed-url imported-snapshot-entry) +(defun import-fragments-feed (fragment-feed-url imported-snapshot-entry &key tm-id) ;a bit of a borderline case if that should be here or in the ;importer. Since it deals with the network interface, I think it ;makes sense to have it here, though @@ -83,7 +83,7 @@ (t (string-max (rest string-list) max))))
-(defun import-snapshots-feed (tm-id snapshot-feed-url) +(defun import-snapshots-feed (snapshot-feed-url &key tm-id) ;this finds the most recent snapshot and imports that. It returns the entry ;corresponding to that snapshot
@@ -150,13 +150,12 @@ (let ((imported-snapshot-entry (import-snapshots-feed - feed-url - (get-attribute snapshot-feed-link-elem "href")))) + (get-attribute snapshot-feed-link-elem "href") + :tm-id feed-url))) (assert imported-snapshot-entry) (import-fragments-feed - feed-url (get-attribute fragment-feed-link-elem "href") - imported-snapshot-entry)))) + imported-snapshot-entry :tm-id feed-url))))
\ No newline at end of file