Class: Valkyrie::Persistence::Solr::ORMConverter::URIValue
- Inherits:
-
ValueMapper
- Object
- ValueMapper
- Valkyrie::Persistence::Solr::ORMConverter::URIValue
- Defined in:
- lib/valkyrie/persistence/solr/orm_converter.rb
Overview
Converts a stored URI value in solr into a RDF::URI
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
146 147 148 |
# File 'lib/valkyrie/persistence/solr/orm_converter.rb', line 146 def self.handles?(value) value.to_s.start_with?("uri-") end |
Instance Method Details
#result ⇒ Object
150 151 152 |
# File 'lib/valkyrie/persistence/solr/orm_converter.rb', line 150 def result ::RDF::URI.new(value.sub(/^uri-/, '')) end |