Sha256: b24c211c48e351c45954076bfd805ef6a34ebca7e66cbf103e69d5c1ecb13756
Contents?: true
Size: 1.71 KB
Versions: 38
Compression:
Stored size: 1.71 KB
Contents
Iqvoc.default_rdf_namespace_helper_methods.each do |meth| document.namespaces(self.send(meth)) end document.namespaces( :search => url_for(request.query_parameters.merge(:page => @results && @results.current_page, :only_path => false, :anchor => "")), :sdc => "http://sindice.com/vocab/search#" ) document << IqRdf.build_full_uri_subject(URI.parse(url_for(request.query_parameters.merge(:page => nil, :only_path => false))), IqRdf::Sdc::build_uri('Query')) do |query| query.Sdc::totalResults(@results.total_count) query.Sdc::itemsPerPage(@results.limit_value) query.Sdc::searchTerms(params[:query]) query.Sdc::first(URI.parse(url_for(request.query_parameters.merge(:page => 1, :only_path => false)))) query.Sdc::last(URI.parse(url_for(request.query_parameters.merge(:page => @results.num_pages, :only_path => false)))) i = 0 @results.each do query.Sdc::result(IqRdf::Search::build_uri("result#{i+=1}")) end end document << IqRdf.build_full_uri_subject(URI.parse(url_for(request.query_parameters.merge(:page => @results.current_page, :only_path => false))), IqRdf::Sdc::build_uri('Page')) do |page| page.Sdc::startIndex((@results.current_page - 1) * @results.limit_value + 1) page.Sdc::previous(URI.parse(url_for(request.query_parameters.merge(:page => @results.current_page - 1, :only_path => false)))) if @results.current_page > 1 page.Sdc::next(URI.parse(url_for(request.query_parameters.merge(:page => @results.current_page + 1, :only_path => false)))) if @results.current_page < @results.num_pages end i = 0 @results.each do |result| document << IqRdf::Search::build_uri("result#{i+=1}", IqRdf::Sdc::build_uri('Result')) do |result_node| result.build_search_result_rdf(document, result_node) end end
Version data entries
38 entries across 38 versions & 1 rubygems