class ActiveFedora::RDF::FieldMap::PolymorphicBuilder
Supports assigning the delegate class that calls .build to insert the fields into the solr document. @attr [Object] entry instance of ActiveFedora::RDF::FieldMapEntry
which will contain the values of the solr field @attr [Object] index_field_config
an instance of ActiveFedora::Indexing::Map::IndexObject
@attr [Object] object the instance of ActiveFedora::Base
which is being indexed into Solr @attr [Symbol] name the name of the property on the object that we’re indexing
Attributes
entry[RW]
index_field_config[RW]
name[RW]
object[RW]
Public Class Methods
new(entry, index_field_config, object, name)
click to toggle source
# File lib/active_fedora/rdf/field_map.rb, line 33 def initialize(entry, index_field_config, object, name) @entry = entry @index_field_config = index_field_config @object = object @name = name end
Public Instance Methods
build()
click to toggle source
# File lib/active_fedora/rdf/field_map.rb, line 40 def build delegate_class.new(entry, index_field_config, object, name).build end
Private Instance Methods
delegate_class()
click to toggle source
# File lib/active_fedora/rdf/field_map.rb, line 46 def delegate_class kind_of_af_base? ? ResourceBuilder : PropertyBuilder end
kind_of_af_base?()
click to toggle source
# File lib/active_fedora/rdf/field_map.rb, line 50 def kind_of_af_base? config = properties[name.to_s] config && config[:class_name] && config[:class_name] < ActiveFedora::Base end
properties()
click to toggle source
# File lib/active_fedora/rdf/field_map.rb, line 55 def properties object.class.properties end