Sha256: cd46af09a8f4b2af944b8c4e895cb2640039111a1c552c2c060ea68084939f0b
Contents?: true
Size: 1.52 KB
Versions: 10
Compression:
Stored size: 1.52 KB
Contents
module ActiveFedora module QueryResultBuilder def self.lazy_reify_solr_results(solr_results, opts = {}) return to_enum(:lazy_reify_solr_results, solr_results, opts) unless block_given? solr_results.each do |hit| yield ActiveFedora::SolrHit.for(hit).reify(opts) end end def self.reify_solr_results(solr_results, opts = {}) lazy_reify_solr_results(solr_results, opts).to_a end def self.reify_solr_result(hit, _opts = {}) Deprecation.warn(ActiveFedora::Base, 'ActiveFedora::QueryResultBuilder.reify_solr_result is deprecated and will be removed in ActiveFedora 10.0; call #reify on the SolrHit instead.') ActiveFedora::SolrHit.for(hit).reify end # Returns all possible classes for the solr object def self.classes_from_solr_document(hit, _opts = {}) Deprecation.warn(ActiveFedora::Base, 'ActiveFedora::QueryResultBuilder.classes_from_solr_document is deprecated and will be removed in ActiveFedora 10.0; call #models on the SolrHit instead.') ActiveFedora::SolrHit.for(hit).models end # Returns the best singular class for the solr object def self.class_from_solr_document(hit, opts = {}) Deprecation.warn(ActiveFedora::Base, 'ActiveFedora::QueryResultBuilder.class_from_solr_document is deprecated and will be removed in ActiveFedora 10.0; call #model on the SolrHit instead.') ActiveFedora::SolrHit.for(hit).model(opts) end HAS_MODEL_SOLR_FIELD = ActiveFedora.index_field_mapper.solr_name("has_model", :symbol).freeze end end
Version data entries
10 entries across 10 versions & 1 rubygems