ontology_search.rb revision 3cd30c1b673c831f98cefdd396fbb94515504ed0
require 'json'
#
# Beware! This is not tested well.
#
end
@limit = 20
end
end
end
#unless repository.ontologies.where("name = :prefix", prefix: prefix, repository_id: repository).empty?
# text_list.add(prefix)
#end
repository.ontologies.select(:name).where("name ILIKE :prefix", prefix: "#{prefix}%").limit(25).group("name").limit(5).each do |ontology|
end
end
end
end
end
end
text_list.to_a.sort.map { |x| {text: x} }
end
end
Entity.select("DISTINCT display_name").where("display_name = :prefix", prefix: prefix).each do |symbol|
end
end
end
end
Ontology.select("DISTINCT name").where("name ILIKE :prefix", prefix: "#{prefix}%").limit(5).each do |ontology|
end
Entity.select("DISTINCT display_name").where("display_name ILIKE :prefix", prefix: "#{prefix}%").limit(5).each do |symbol|
end
Entity.select("DISTINCT name").where("name ILIKE :prefix", prefix: "#{prefix}%").limit(5).each do |symbol|
end
Entity.select("DISTINCT text").where("text ILIKE :prefix", prefix: "#{prefix}%").limit(5).each do |symbol|
end
end
text_list.to_a.sort.map { |x| {text: x} }
end
end
end
# Display all repository ontologies for empty keyword list
if keyword_list.size == 0
end
return Response.new(page, @limit, repository.ontologies.count, bean_list_factory.bean_list)
end
index = 0
end
Response.new(page, @limit, search.total, bean_list_factory.bean_list)
end
# Display all ontologies for empty keyword list
if keyword_list.size == 0
end
return Response.new(page, @limit, Ontology.count, bean_list_factory.bean_list)
end
end
Response.new(page, @limit, search.total, bean_list_factory.bean_list)
end
end