Class: Valkyrie::Persistence::Fedora::ListNode::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/valkyrie/persistence/fedora/list_node.rb

Overview

Class used to populate the RDF graph structure for the linked lists

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri, graph) ⇒ Builder

Returns a new instance of Builder.

Parameters:

  • uri (RDF::URI)

    the URI for the linked list in the graph store

  • graph (RDF::Repository)

    the RDF graph to be populated



96
97
98
99
# File 'lib/valkyrie/persistence/fedora/list_node.rb', line 96

def initialize(uri, graph)
  @uri = uri
  @graph = graph
end

Instance Attribute Details

#graphObject (readonly)

Returns the value of attribute graph.



92
93
94
# File 'lib/valkyrie/persistence/fedora/list_node.rb', line 92

def graph
  @graph
end

#uriObject (readonly)

Returns the value of attribute uri.



92
93
94
# File 'lib/valkyrie/persistence/fedora/list_node.rb', line 92

def uri
  @uri
end

Instance Method Details

#populate(instance) ⇒ Object

Populates attributes for the LinkedNode

Parameters:



103
104
105
106
107
108
# File 'lib/valkyrie/persistence/fedora/list_node.rb', line 103

def populate(instance)
  instance.proxy_for = resource.proxy_for
  instance.proxy_in = resource.proxy_in
  instance.next_uri = resource.next
  instance.prev_uri = resource.prev
end