Changeset 447 for trunk/src/json/JTM


Ignore:
Timestamp:
05/02/11 15:05:19 (14 years ago)
Author:
lgiessmann
Message:

JTM: added unit-tests for exporting entire topic maps and the entire store as jtm 1.0 and 1.1 => fixed some bugs in the corresponding functions; xml-importer + rdf-importer: fixed a bug when creating instance-of associations => currently the topics type-instance, type, and instance is added to the topic map that the created instance-of association belongs to

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/json/JTM/jtm_tools.lisp

    r445 r447  
    9292                         (get-all-associations revision))))
    9393                (if version-1.1-p
    94                     assocs
    9594                    (set-difference
    9695                     assocs
    9796                     (loop for top in tm-tops
    98                         append (instance-of-associations top :revision revision))))))
     97                        append (instance-of-associations top :revision revision)))
     98                    assocs)))
    9999             (prefixes
    100100              (when version-1.1-p
     
    107107                                      (export-prefix-list-to-jtm prefixes) ",")))
    108108             (iis (concat "\"item_identifiers\":"
    109                           (export-identifiers-to-jtm
    110                            tm :identifier-type 'ItemIdentifierC :prefixes prefixes
    111                            :revision revision) ","))
     109                          (if tm
     110                              (export-identifiers-to-jtm
     111                               tm :identifier-type 'ItemIdentifierC :prefixes prefixes
     112                               :revision revision)
     113                              "null") ","))
    112114             (topics (concat "\"topics\":"
    113115                             (export-topics-to-jtm
    114116                              tm-tops :prefixes prefixes :instance-of-p version-1.1-p
    115                               :item-type-p nil :revision revision)))
     117                              :item-type-p nil :revision revision) ","))
    116118             (assocs (concat "\"associations\":"
    117119                             (export-associations-to-jtm
    118120                              tm-assocs :prefixes prefixes
    119                               :item-type-p nil :revision revision)))
    120              (item-type (concat "\"item_type\":" item_type-topicmap ","))
     121                              :item-type-p nil :revision revision) ","))
     122             (item-type (concat "\"item_type\":\"" item_type-topicmap "\","))
    121123             (tm-reifier
    122124              (concat "\"reifier\":"
     
    125127                                                 :revision revision)
    126128                          "null"))))
    127         (concat "{" version prefix-value iis topics assocs item-type tm-reifier"}")))))
     129        (concat "{" version prefix-value iis topics assocs item-type tm-reifier
     130                "}")))))
    128131             
    129132             
     
    133136  "Exports a topic map or all stored constructs as JTM file by calling
    134137   export-as-jtm-string."
    135   (declare (type (or Null String) jtm-path tm-id)
     138  (declare (type (or Null String) tm-id)
     139           (type (or String Pathname) jtm-path)
    136140           (Symbol jtm-format)
    137141           (Integer revision))
Note: See TracChangeset for help on using the changeset viewer.