Class: Valkyrie::Persistence::Fedora::Persister::ModelConverter::InternalValkyrieID
- Inherits:
-
MappedFedoraValue
- Object
- ValueMapper
- MappedFedoraValue
- Valkyrie::Persistence::Fedora::Persister::ModelConverter::InternalValkyrieID
- Defined in:
- lib/valkyrie/persistence/fedora/persister/model_converter.rb
Overview
Class mapping Property objects for Valkyrie IDs which have not been mapped to Fedora LDP URIs
Instance Attribute Summary
Attributes inherited from ValueMapper
Class Method Summary collapse
-
.handles?(value) ⇒ Boolean
Determines whether or not the value is a Property for Valkyrie ID which is not contain an adapter resource path URI.
Instance Method Summary collapse
-
#result ⇒ Valkyrie::Persistence::Fedora::Persister::ModelConverter::Property
Generates the Property for this URI For example, a Valkyrie::ID with the value “c0831f2e-f86b-4d4a-9331-020b7418b068” will first be mapped to <localhost:8988/rest/test_fed/c0/83/1f/2e/c0831f2e-f86b-4d4a-9331-020b7418b068>.
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 value is a Property for Valkyrie ID which is not contain an adapter resource path URI
377 378 379 |
# File 'lib/valkyrie/persistence/fedora/persister/model_converter.rb', line 377 def self.handles?(value) value.is_a?(Property) && value.value.is_a?(Valkyrie::ID) && !value.value.to_s.include?("://") end |
Instance Method Details
#result ⇒ Valkyrie::Persistence::Fedora::Persister::ModelConverter::Property
Generates the Property for this URI For example, a Valkyrie::ID with the value “c0831f2e-f86b-4d4a-9331-020b7418b068”
will first be mapped to <http://localhost:8988/rest/test_fed/c0/83/1f/2e/c0831f2e-f86b-4d4a-9331-020b7418b068>
385 386 387 |
# File 'lib/valkyrie/persistence/fedora/persister/model_converter.rb', line 385 def result map_value(converted_value: value.adapter.id_to_uri(value.value)) end |