wiki:XtmImExporter

Wiki

XTM Im-/Exporter

XTM Importer

The XTM importer enables importing XML Topic Maps (xtm) in versions 1.0 and 2.0. Therefore following functions exist:

  • init-isidorus
    • imports the file core_psis.xtm
  • import-from-xtm
    • imports a given XTM file without importing additional core topics
  • setup-repository
    • imports the file core_psis.xtm efore importing the actual xtm file

The functions "import-from-xtm" and "setup-repository" offers following parameters:

  • xtm-path: a string describing the path of the imported xtm-file
  • repository-path: a string describing the path of the data base
  • tm-id: a string describing the id of a particular topic map (URI)
  • xtm-format: a symbol which describes the format of the imported file, either ":1.0" or ":2.0"
  • xtm-id: a string describing the identifier of the imported file. This identifier is necessary to reference topics with the given Topic IDs, since these IDs are only unique in a certain document


Several additional functions exist which enables importing an XML-DOM. But it is strongly recommended to use the shown functions above, since they are captured in a "single-writer-multiple-reader-lock" to avoid errors in the data base while ex-/importing files in parallel.

XTM Exporter

The XTM Exporter enables the serialization of stored TM-constructs as XTM files in the versions 1.0 and 2.0. Therefore following functions exist:

  • export-as-xtm
    • this function exports stored objects as xtm file
    • following parameters are setable
      • xtm-path: a string describing the destination path of the exported xtm-file
      • tm-id: a string describung the topic map ID. If it is set to nil, the entire store is exported
      • revision: an integer of the TM-objects' version. Just the bounded objects to the given version are exported
      • xtm-format: a symbol describing the format of the exported xt file, either "'1.02" or "'2.0"
  • export-as-xtm-string
    • this function is similar to "export-xtm" but instead of creating an xtm file the objects are exported as a string
    • following parameters are setable:
      • tm-id
      • revision
      • xtm-format
  • export-construct-as-xtm-string
    • exports the called object as xtm file
    • following parameters are setable:
      • fragment: the fragment object which has to be serialized
      • xtm-format
Last modified 13 years ago Last modified on 05/03/11 21:35:58