Class: Valkyrie::Persistence::Solr::ModelConverter::LiteralPropertyValue
- Inherits:
-
ValueMapper
- Object
- ValueMapper
- Valkyrie::Persistence::Solr::ModelConverter::LiteralPropertyValue
- Defined in:
- lib/valkyrie/persistence/solr/model_converter.rb
Overview
Handles casting language-typed RDF::Literals
Instance Attribute Summary
Attributes inherited from ValueMapper
Class Method Summary collapse
-
.handles?(value) ⇒ Boolean
Determines whether or not a Property value is an RDF literal.
Instance Method Summary collapse
-
#result ⇒ CompositeSolrRow
Constructs a CompositeSolrRow object with the language-tagged literal value.
Methods inherited from ValueMapper
Constructor Details
This class inherits a constructor from Valkyrie::ValueMapper
Class Method Details
Instance Method Details
#result ⇒ CompositeSolrRow
Constructs a CompositeSolrRow object with the language-tagged literal value
446 447 448 449 450 451 452 453 454 455 456 |
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 446 def result key = value.key val = value.value CompositeSolrRow.new( [ calling_mapper.for(Property.new(key, val.to_s)).result, calling_mapper.for(Property.new("#{key}_lang", val.language.to_s)).result, calling_mapper.for(Property.new("#{key}_type", val.datatype.to_s)).result ] ) end |