Class: Valkyrie::Persistence::Fedora::Persister::OrmConverter::GraphToAttributes
- Inherits:
-
Object
- Object
- Valkyrie::Persistence::Fedora::Persister::OrmConverter::GraphToAttributes
- Defined in:
- lib/valkyrie/persistence/fedora/persister/orm_converter.rb
Defined Under Namespace
Classes: Applicator, BlacklistedValue, BooleanValue, CompositeApplicator, CreatedAtValue, DateTimeValue, DifferentSubject, FedoraValue, IntegerValue, InternalModelValue, InternalURI, LiteralValue, MemberID, NestedValue, NonStringSingleApplicator, NullApplicator, Property, SingleApplicator, TimeValue, UpdatedAtValue, ValkyrieIDValue
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
-
#graph ⇒ Object
readonly
Returns the value of attribute graph.
Instance Method Summary collapse
- #attributes ⇒ Object
- #convert ⇒ Object
-
#initialize(graph:, adapter:) ⇒ GraphToAttributes
constructor
A new instance of GraphToAttributes.
Constructor Details
#initialize(graph:, adapter:) ⇒ GraphToAttributes
34 35 36 37 |
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 34 def initialize(graph:, adapter:) @graph = graph @adapter = adapter end |
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter.
33 34 35 |
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 33 def adapter @adapter end |
#graph ⇒ Object (readonly)
Returns the value of attribute graph.
33 34 35 |
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 33 def graph @graph end |
Instance Method Details
#attributes ⇒ Object
46 47 48 |
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 46 def attributes @attributes ||= {} end |
#convert ⇒ Object
39 40 41 42 43 44 |
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 39 def convert graph.each do |statement| FedoraValue.for(Property.new(statement: statement, scope: graph, adapter: adapter)).result.apply_to(attributes) end attributes end |