Sha256: b7bbc5af7e2fcecf1a44638f9d355faaeda4bed7039e4a78c1513323d41a983d

Contents?: true

Size: 793 Bytes

Versions: 1

Compression:

Stored size: 793 Bytes

Contents

# Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig.
# License:   Apache License, Version 2.0


module RTM::IO
  # Import and Export of TMAPI Topic Maps
  # Utilizing the Ontopia libary http://code.google.com/p/tmapix/
  # Consequently the (de-) serializer provided here 
  # are only Wrapper
  
  module Ontopia
    module TopicMap
      def to_cxtm(filename, base_iri = nil)
        raise("Only supported for Ontopia.") unless self.kind_of?(net.ontopia.topicmaps.impl.tmapi2.TopicMapImpl)
        out_file = java.io.FileOutputStream.new(filename) 
        writer = net.ontopia.topicmaps.xml.CanonicalXTMWriter.new(out_file)
        writer.write(self.wrapped)
        out_file.flush
        out_file.close      
      end
    end
    
    RTM.register_extension(self)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rtm-ontopia-0.2.0 lib/rtm/ontopia/io/to_cxtm.rb