class ActiveFedora::RDF::FieldMap::PolymorphicBuilder

@attr [Symbol] name the name of the property on the object that we’re indexing
@attr [Object] object the instance of ActiveFedora::Base which is being indexed into Solr
@attr [Object] index_field_config an instance of ActiveFedora::Indexing::Map::IndexObject
@attr [Object] entry instance of ActiveFedora::RDF::FieldMapEntry which will contain the values of the solr field
Supports assigning the delegate class that calls .build to insert the fields into the solr document.

def build

def build
  delegate_class.new(entry, index_field_config, object, name).build
end

def delegate_class

def delegate_class
  kind_of_af_base? ? ResourceBuilder : PropertyBuilder
end

def initialize(entry, index_field_config, object, name)

def initialize(entry, index_field_config, object, name)
  @entry              = entry
  @index_field_config = index_field_config
  @object             = object
  @name               = name
  self
end

def kind_of_af_base?

def kind_of_af_base?
  config = properties[name.to_s]
  config && config[:class_name] && config[:class_name] < ActiveFedora::Base
end

def properties

def properties
  object.class.properties
end