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

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

Overview

Class for handling cases where deny listed values should not be mapped

Direct Known Subclasses

BlacklistedValue

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 a denied namespace for the RDF statement object (i. e. avoid attempting to map any RDF statements making assertions about LDP containers or resource internal to Fedora)

Parameters:

Returns:

  • (Boolean)

106
107
108
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 106

def self.handles?(value)
  value.statement.object.to_s.start_with?("http://www.w3.org/ns/ldp", "http://fedora.info")
end

Instance Method Details

#resultObject

Provide the NullApplicator Class for any Property in a deny listed namespace


111
112
113
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 111

def result
  NullApplicator
end