Dir.mktmpdir do |dir|
end
end
end
symbol.user = user if symbol.has_attribute? "user_id"
rescue ActiveRecord::RecordInvalid => e
end
end
end
if ontology
else
end
end
end
# clean up
# generating new
ontologies.each do |ontology|
rescue ActiveRecord::RecordNotFound => e
puts "Could not create symbol tree for: #{ontology.name} (#{ontology.id}) caused #{e}"
end
end
end
#cleaning up to prevent duplicated symbol_groups
#generating new
rescue ActiveRecord::RecordNotFound => e
puts "Could not create entity tree for: #{ontology.name} (#{ontology.id}) caused #{e}"
end
end
end
x = klass.find_by_name(h[:name])
if x.nil?
x = klass.create!(h)
else
end
x
end
end
filepath = "#{Rails.root}/spec/fixtures/seeds/#{target_file}"
"https://ontohub.org/repositories/meta/master/download/#{source_file}"
else
puts 'No connection to ontohub.org. Using local file for the current task.'
end
end
end
end
end
end
end
end
end