Author: lgiessmann Date: Sun Mar 21 15:17:59 2010 New Revision: 241
Log: new-datamodel: changed some code sections that caused problems with the package "xml"
Modified: branches/new-datamodel/src/model/datamodel.lisp branches/new-datamodel/src/xml/rdf/importer.lisp branches/new-datamodel/src/xml/rdf/map_to_tm.lisp
Modified: branches/new-datamodel/src/model/datamodel.lisp ============================================================================== --- branches/new-datamodel/src/model/datamodel.lisp (original) +++ branches/new-datamodel/src/model/datamodel.lisp Sun Mar 21 15:17:59 2010 @@ -22,6 +22,8 @@ :TopicMapConstructC :VersionedConstructC :ReifiableConstructC + :ScopableC + :TypableC :TopicMapC :AssociationC :RoleC
Modified: branches/new-datamodel/src/xml/rdf/importer.lisp ============================================================================== --- branches/new-datamodel/src/xml/rdf/importer.lisp (original) +++ branches/new-datamodel/src/xml/rdf/importer.lisp Sun Mar 21 15:17:59 2010 @@ -67,7 +67,7 @@ ((top (from-topic-elem-to-stub top-elem revision :xtm-id *rdf-core-xtm*))) - (add-to-topicmap xml-importer::tm top)))))))) + (add-to-tm xml-importer::tm top))))))))
(defun import-dom (rdf-dom start-revision @@ -355,7 +355,7 @@ (list :instance-of role-type-2 :player sub-top)))) (let ((assoc - (add-to-topicmap + (add-to-tm tm (make-construct 'AssociationC :start-revision start-revision @@ -396,7 +396,7 @@ (list :instance-of roletype-2 :player instance-top)))) (let ((assoc - (add-to-topicmap + (add-to-tm tm (make-construct 'AssociationC :start-revision start-revision @@ -449,7 +449,7 @@ :uri ii-uri :start-revision start-revision))))) (handler-case (let ((top - (add-to-topicmap + (add-to-tm tm (make-construct 'TopicC @@ -502,7 +502,7 @@ (list :instance-of role-type-2 :player top)))) (let ((assoc - (add-to-topicmap tm (make-construct 'AssociationC + (add-to-tm tm (make-construct 'AssociationC :start-revision start-revision :instance-of type-top :roles roles)))) @@ -531,7 +531,7 @@ (list :instance-of role-type-2 :player object-topic)))) (let ((assoc - (add-to-topicmap + (add-to-tm tm (make-construct 'AssociationC :start-revision start-revision :instance-of associationtype-topic
Modified: branches/new-datamodel/src/xml/rdf/map_to_tm.lisp ============================================================================== --- branches/new-datamodel/src/xml/rdf/map_to_tm.lisp (original) +++ branches/new-datamodel/src/xml/rdf/map_to_tm.lisp Sun Mar 21 15:17:59 2010 @@ -188,7 +188,7 @@ (delete-related-associations assoc-top) (d::delete-construct assoc-top) (with-tm (start-revision document-id tm-id) - (add-to-topicmap + (add-to-tm xml-importer::tm (let ((association (make-construct 'AssociationC @@ -229,9 +229,9 @@ (new-item-ids (map-isi-identifiers top start-revision)) (occurrence-topics (get-isi-occurrences top start-revision)) (name-topics (get-isi-names top start-revision))) - (bound-subject-identifiers top new-psis) - (bound-subject-locators top new-locators) - (bound-item-identifiers top new-item-ids) + (bound-subject-identifiers top new-psis start-revision) + (bound-subject-locators top new-locators start-revision) + (bound-item-identifiers top new-item-ids start-revision) (map 'list #'(lambda(occurrence-topic) (map-isi-occurrence top occurrence-topic start-revision)) occurrence-topics) @@ -560,7 +560,7 @@ ids)))))
-(defun bound-item-identifiers (construct identifiers) +(defun bound-item-identifiers (construct identifiers start-revision) "Bounds the passed item-identifier to the passed construct." (declare (ReifiableConstructC construct)) (dolist (id identifiers) @@ -569,11 +569,12 @@ (string= (uri ii) (uri id))) (item-identifiers construct)) (d::delete-construct id) - (setf (identified-construct id) construct))) + (add-item-identifier (identified-construct id :revision start-revision) + construct :revision start-revision))) construct)
-(defun bound-subject-identifiers (top identifiers) +(defun bound-subject-identifiers (top identifiers start-revision) "Bounds the passed psis to the passed topic." (declare (TopicC top)) (dolist (id identifiers) @@ -582,11 +583,12 @@ (string= (uri psi) (uri id))) (psis top)) (d::delete-construct id) - (setf (identified-construct id) top))) + (add-psi (identified-construct id :revision start-revision) + top :revision start-revision))) top)
-(defun bound-subject-locators (top locators) +(defun bound-subject-locators (top locators start-revision) "Bounds the passed locators to the passed topic." (declare (TopicC top)) (dolist (id locators) @@ -595,7 +597,8 @@ (string= (uri locator) (uri id))) (locators top)) (d::delete-construct id) - (setf (identified-construct id) top))) + (add-locator (identified-construct id :revision start-revision) + top :revision start-revision))) top)