Class: Valkyrie::Persistence::Fedora::Persister::OrmConverter::GraphToAttributes::InternalModelValue
- Inherits:
-
ValueMapper
- Object
- ValueMapper
- Valkyrie::Persistence::Fedora::Persister::OrmConverter::GraphToAttributes::InternalModelValue
- Defined in:
- lib/valkyrie/persistence/fedora/persister/orm_converter.rb
Overview
Casts the value of the RDF statements encoding the type of Valkyrie Resource into the resource type
Instance Attribute Summary
Attributes inherited from ValueMapper
Class Method Summary collapse
-
.handles?(value) ⇒ Boolean
Determines whether or not the Property RDF statement refers to a resource type.
Instance Method Summary collapse
-
#result ⇒ SingleApplicator
Constructs a SingleApplicator object for mapping the resource type.
Methods inherited from ValueMapper
Constructor Details
This class inherits a constructor from Valkyrie::ValueMapper
Class Method Details
.handles?(value) ⇒ Boolean
Determines whether or not the Property RDF statement refers to a resource type
449 450 451 |
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 449 def self.handles?(value) value.statement.predicate == value.adapter.schema.predicate_for(property: :internal_resource, resource: nil) end |
Instance Method Details
#result ⇒ SingleApplicator
Constructs a SingleApplicator object for mapping the resource type
455 456 457 |
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 455 def result SingleApplicator.new(value) end |