(handler-case (progn (funcall thunk) nil) (topic-maps.cxtm:cxtm-error (c) c)))
(defun map-state (map)
;; Includes object handles, all forward links, raw stored references/sets.
(handler-case (progn (funcall thunk) nil) (topic-maps.cxtm:cxtm-error (c) c)))
(defun map-state (map)
;; Includes object handles, all forward links, raw stored references/sets.
(copy-list (topic-maps.tmdm::%topic-map-topics map))
(copy-list (topic-maps.tmdm::%topic-map-associations map))
(loop for topic in (topic-map-topics map) collect
(list topic (topic-maps.tmdm::%topic-forward topic) (topic-parent topic)
(topic-item-identifiers topic) (topic-subject-identifiers topic) (topic-subject-locators topic)
(loop for n in (topic-names topic) collect
(copy-list (topic-maps.tmdm::%topic-map-topics map))
(copy-list (topic-maps.tmdm::%topic-map-associations map))
(loop for topic in (topic-map-topics map) collect
(list topic (topic-maps.tmdm::%topic-forward topic) (topic-parent topic)
(topic-item-identifiers topic) (topic-subject-identifiers topic) (topic-subject-locators topic)
(loop for n in (topic-names topic) collect
(topic-name-type n) (topic-name-value n) (copy-list (topic-maps.tmdm::%topic-name-scope n))
(loop for v in (topic-maps.tmdm::%topic-name-variants n) collect
(topic-name-type n) (topic-name-value n) (copy-list (topic-maps.tmdm::%topic-name-scope n))
(loop for v in (topic-maps.tmdm::%topic-name-variants n) collect
(topic-maps.tmdm::%variant-value v) (topic-maps.tmdm::%variant-datatype v)
(copy-list (topic-maps.tmdm::%variant-scope v))))))
(loop for o in (topic-maps.tmdm:topic-occurrences topic) collect
(topic-maps.tmdm::%variant-value v) (topic-maps.tmdm::%variant-datatype v)
(copy-list (topic-maps.tmdm::%variant-scope v))))))
(loop for o in (topic-maps.tmdm:topic-occurrences topic) collect
(topic-maps.tmdm:occurrence-type o) (topic-maps.tmdm:occurrence-value o)
(topic-maps.tmdm:occurrence-datatype o) (topic-maps.tmdm:occurrence-item-identifiers o)
(copy-list (topic-maps.tmdm::%occurrence-scope o))))))
(loop for a in (topic-maps.tmdm:topic-map-associations map) collect
(topic-maps.tmdm:occurrence-type o) (topic-maps.tmdm:occurrence-value o)
(topic-maps.tmdm:occurrence-datatype o) (topic-maps.tmdm:occurrence-item-identifiers o)
(copy-list (topic-maps.tmdm::%occurrence-scope o))))))
(loop for a in (topic-maps.tmdm:topic-map-associations map) collect
(topic-maps.tmdm:association-parent a) (copy-list (topic-maps.tmdm::%association-scope a))
(loop for r in (topic-maps.tmdm:association-roles a) collect
(topic-maps.tmdm:association-parent a) (copy-list (topic-maps.tmdm::%association-scope a))
(loop for r in (topic-maps.tmdm:association-roles a) collect
(topic-maps.tmdm:association-role-type r) (topic-maps.tmdm:association-role-player r)
(topic-maps.tmdm:association-role-parent r)))))))
(defun compare-cxtm-cases ()
(topic-maps.tmdm:association-role-type r) (topic-maps.tmdm:association-role-player r)
(topic-maps.tmdm:association-role-parent r)))))))
(defun compare-cxtm-cases ()