37
38
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/dor/datastreams/role_metadata_ds.rb', line 37
def to_solr(solr_doc=Hash.new, *args)
self.find_by_xpath('/roleMetadata/role/*').each do |actor|
role_type = actor.parent['type']
val = [actor.at_xpath('identifier/@type'),actor.at_xpath('identifier/text()')].join ':'
add_solr_value(solr_doc, "apo_role_#{actor.name}_#{role_type}", val, :string, [:searchable, :facetable])
add_solr_value(solr_doc, "apo_role_#{role_type}", val, :string, [:searchable, :facetable])
unless role_type =~ /^hydrus/
add_solr_value(solr_doc, "apo_register_permissions", val, :string, [:searchable, :facetable])
end
end
solr_doc
end
|