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)


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

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



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

def result
  NullApplicator
end