Class: ImportController

Inherits:
ApplicationController show all
Defined in:
app/controllers/import_controller.rb

Instance Method Summary collapse

Instance Method Details

#importObject



28
29
30
31
32
33
34
35
36
37
# File 'app/controllers/import_controller.rb', line 28

def import
  content = params[:ntriples_file] && params[:ntriples_file].read
  strio = StringIO.new
  begin
    Iqvoc::SkosImporter.new(content.to_s.split("\n"), params[:default_namespace], Logger.new(strio))
    @messages = strio.string
  rescue Exception => e
    @messages = e.to_s + "\n\n" + e.backtrace.join("\n")
  end
end

#indexObject



25
26
# File 'app/controllers/import_controller.rb', line 25

def index
end