Class: Valkyrie::Persistence::Postgres::ORMConverter::RDFMetadata::URIValue

Inherits:
ValueMapper
  • Object
show all
Defined in:
lib/valkyrie/persistence/postgres/orm_converter.rb

Overview

Converts stored URIs into RDF::URIs

Instance Attribute Summary

Attributes inherited from ValueMapper

#calling_mapper, #value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ValueMapper

for, #initialize, register

Constructor Details

This class inherits a constructor from Valkyrie::ValueMapper

Class Method Details

.handles?(value) ⇒ Boolean

Returns:

  • (Boolean)


89
90
91
# File 'lib/valkyrie/persistence/postgres/orm_converter.rb', line 89

def self.handles?(value)
  value.is_a?(Hash) && value["@id"]
end

Instance Method Details

#resultObject



93
94
95
# File 'lib/valkyrie/persistence/postgres/orm_converter.rb', line 93

def result
  ::RDF::URI.new(value["@id"])
end