Class: Valkyrie::Persistence::Solr::ModelConverter::URIPropertyValue
- Inherits:
-
ValueMapper
- Object
- ValueMapper
- Valkyrie::Persistence::Solr::ModelConverter::URIPropertyValue
- Defined in:
- lib/valkyrie/persistence/solr/model_converter.rb
Overview
Casts RDF::URI values into a recognizable string in solr.
Instance Attribute Summary
Attributes inherited from ValueMapper
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from ValueMapper
Constructor Details
This class inherits a constructor from Valkyrie::ValueMapper
Class Method Details
.handles?(value) ⇒ Boolean
200 201 202 |
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 200 def self.handles?(value) value.is_a?(Property) && value.value.is_a?(::RDF::URI) end |
Instance Method Details
#result ⇒ Object
204 205 206 |
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 204 def result calling_mapper.for(Property.new(value.key, "uri-#{value.value}")).result end |