Class: Valkyrie::Persistence::Solr::ORMConverter::NestedResourceURI
- Inherits:
-
ValueMapper
- Object
- ValueMapper
- Valkyrie::Persistence::Solr::ORMConverter::NestedResourceURI
- Defined in:
- lib/valkyrie/persistence/solr/orm_converter.rb
Overview
Class for handling serialized Hashes for URIs in Solr fields
Instance Attribute Summary
Attributes inherited from ValueMapper
Class Method Summary collapse
-
.handles?(value) ⇒ Boolean
Determines whether or not an Object is a Hash with a URI string mapped to the “@id” key.
Instance Method Summary collapse
-
#result ⇒ RDF::URI
Constructs a RDF::URI object using the value keyed to :@id in the Property Hash value.
Methods inherited from ValueMapper
Constructor Details
This class inherits a constructor from Valkyrie::ValueMapper
Class Method Details
.handles?(value) ⇒ Boolean
Note:
this is used to determine whether or not this is a nested URI for an attribute
Determines whether or not an Object is a Hash with a URI string mapped to the “@id” key
334 335 336 |
# File 'lib/valkyrie/persistence/solr/orm_converter.rb', line 334 def self.handles?(value) value.is_a?(Hash) && value[:@id] end |