Class: Valkyrie::Persistence::Fedora::Persister::OrmConverter::GraphToAttributes::DifferentSubject

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

Overview

Class for handling cases where the RDF subject of a Property references a separate resource using a hash URI

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

Determines whether or not the value has an RDF subject using a hash URI

(Hash URIs are treated as different resources)

Parameters:

Returns:

  • (Boolean)


126
127
128
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 126

def self.handles?(value)
  value.statement.subject.to_s.include?("#")
end

Instance Method Details

#resultObject

Provide the NullApplicator Class for any Property with a hash URI in the RDF subject



131
132
133
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 131

def result
  NullApplicator
end